package com.alex.demos.domain;

import java.io.Serializable;
import java.util.Date;

import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.EnumType;
import javax.persistence.Enumerated;
import javax.persistence.GeneratedValue;
import javax.persistence.GenerationType;
import javax.persistence.Id;
import javax.persistence.Temporal;
import javax.persistence.TemporalType;

@Entity
public class SayingPO implements Serializable {

	private static final long serialVersionUID = -5972057936058711295L;

	@Id
	@GeneratedValue(strategy = GenerationType.IDENTITY)
	private Long id;

	private Long ref_id;

	// 作者
	@Column(length = 50)
	private String author;

	@Column(length = 50)
	private String ref_author;

	// 内容
	@Column(length = 300)
	private String content;

	@Column(length = 300)
	private String ref_content;

	// 大分类
	@Enumerated(EnumType.ORDINAL)
	private GreetingType0 type0;

	// 小分类
	@Column(length = 50)
	private String type;

	@Temporal(TemporalType.TIMESTAMP)
	private Date date;

	public SayingPO(String author, String content, GreetingType0 type0,
			String type, Date date) {
		this.author = author;
		this.content = content;
		this.type0 = type0;
		this.type = type;
		this.date = date;
	}

	public SayingPO() {
	}

	public void setId(Long id) {
		this.id = id;
	}

	public Long getId() {
		return id;
	}

	public GreetingType0 getType0() {
		return type0;
	}

	public void setType0(GreetingType0 type0) {
		this.type0 = type0;
	}

	public String getAuthor() {
		return author;
	}

	public void setAuthor(String author) {
		this.author = author;
	}

	public Long getRef_id() {
		return ref_id;
	}

	public void setRef_id(Long ref_id) {
		this.ref_id = ref_id;
	}

	public String getRef_author() {
		return ref_author;
	}

	public void setRef_author(String ref_author) {
		this.ref_author = ref_author;
	}

	public String getRef_content() {
		return ref_content;
	}

	public void setRef_content(String ref_content) {
		this.ref_content = ref_content;
	}

	public String getType() {
		return type;
	}

	public void setType(String type) {
		this.type = type;
	}

	public String getContent() {
		return content;
	}

	public Date getDate() {
		return date;
	}

	public void setContent(String content) {
		this.content = content;
	}

	public void setDate(Date date) {
		this.date = date;
	}
}
